From: Owen Taylor Date: Sun, 23 Nov 2008 04:12:37 +0000 (+0000) Subject: Tweak the animation when the overlay comes up X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~11560 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1fb2585d8f85a61a3aea763e8c1caebae33e7301;p=gnome-shell.git Tweak the animation when the overlay comes up - Make the time a bit longer (now that we control timing in Tweener better it actually takes the time we specify) - Use easeOutQuad so that we get a "soft landing" into position - Move the anchor point of the Desktop to NorthEast to reduce jitter svn path=/trunk/; revision=80 --- diff --git a/js/ui/overlay.js b/js/ui/overlay.js index f9152c58f..5c8a60fea 100644 --- a/js/ui/overlay.js +++ b/js/ui/overlay.js @@ -24,7 +24,7 @@ const SIDESHOW_TEXT_COLOR = new Clutter.Color(); SIDESHOW_TEXT_COLOR.from_pixel(0xffffffff); // Time for initial animation going into overlay mode -const ANIMATION_TIME = 0.3; +const ANIMATION_TIME = 0.5; // How much to scale the desktop down by in overlay mode const DESKTOP_SCALE = 0.75; @@ -283,13 +283,16 @@ Overlay.prototype = { this._windowClones.push(desktop); this._group.add_actor(desktop); + // Since the right side only moves a little bit (the width of padding + // we add) it looks less jittery to put the anchor there. + desktop.move_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST); Tweener.addTween(desktop, - { x: this._desktopX, + { x: this._desktopX + this._desktopWidth, y: this._desktopY, scale_x: DESKTOP_SCALE, scale_y: DESKTOP_SCALE, time: ANIMATION_TIME, - transition: "linear" + transition: "easeOutQuad" }); desktop.connect("button-press-event", @@ -356,7 +359,7 @@ Overlay.prototype = { scale_y: scale, time: ANIMATION_TIME, opacity: WINDOW_OPACITY, - transition: "linear" + transition: "easeOutQuad" }); clone.connect("button-press-event",